home *** CD-ROM | disk | FTP | other *** search
/ Whiteline: delta / whiteline CD Series - delta.iso / tex / style / misc / smaller.sty < prev    next >
Text File  |  1995-11-25  |  2KB  |  41 lines

  1. %Date: Thu, 1 Feb 90 15:23:02 EST
  2. %From: Bernie Cosell <cosell@WILMA.BBN.COM>
  3. %Subject: Relative font sizing in LaTeX
  4. %Keywords: LaTeX, font sizing
  5. %
  6. % Modified 1-May-1990 Don Hosek to allow it to work properly when input
  7. % by another .sty file.
  8. %
  9. %One continual annoyance to me is that LaTeX does absolute font sizing,
  10. %and so if you have some \newcommand that uses the sizing commands to
  11. %achieve some graphic effect, you'll discover that your chapter heads
  12. %and footnotes and such are pretty screwed up [in a recent case, I
  13. %wanted a fake small-caps-san-serif font, and so I used {\small\sf
  14. %NOWISTHETIME}, which did just what I wanted in the running text, but
  15. %was an unmitigated disaster in the chapter heads].  I think that the
  16. %following is a significant improvement: \smaller and \larger changes
  17. %the point size *relatively* by one slot, and so I made my definition:
  18. %{\smaller\sf NOWISTHETIME}, and it all magically works.  The
  19. %definitions are:
  20.  
  21. \def\smaller{\ifx\@currsize\Huge \protect\huge \else
  22.               \ifx\@currsize\huge \protect\LARGE \else
  23.                \ifx\@currsize\LARGE \protect\Large \else
  24.                 \ifx\@currsize\Large \protect\large \else
  25.                  \ifx\@currsize\large \protect\normalsize \else
  26.                   \ifx\@currsize\normalsize \protect\small \else
  27.                    \ifx\@currsize\small \protect\footnotesize \else
  28.                     \ifx\@currsize\footnotesize \protect\scriptsize \else
  29.                        \protect\tiny
  30.                     \fi\fi\fi\fi\fi\fi\fi\fi}
  31. \def\larger{\ifx\@currsize\tiny \protect\scriptsize \else
  32.               \ifx\@currsize\scriptsize \protect\footnotesize \else
  33.                \ifx\@currsize\footnotesize \protect\small \else
  34.                 \ifx\@currsize\small \protect\normalsize \else
  35.                  \ifx\@currsize\normalsize \protect\large \else
  36.                   \ifx\@currsize\large \protect\Large \else
  37.                    \ifx\@currsize\Large \protect\LARGE \else
  38.                     \ifx\@currsize\LARGE \protect\huge \else
  39.                        \protect\Huge
  40.                     \fi\fi\fi\fi\fi\fi\fi\fi}
  41.